package edu.bit.water.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.stereotype.Repository;

import edu.bit.water.entity.Chart;

import java.util.List;

@Mapper
@Repository
public interface WbalChartDao {

	Chart selectByName(@Param("chartName") String chartName, @Param("companyId") String companyId);

	int addChart(Chart chart);

	int updateChart(Chart chart) throws DuplicateKeyException;

	List<Chart> selectChartByBusiness(int businessId);

	Integer getMaxId();

	//查询单个流程图数据
	Chart selectOne(int id);

	//删除流程图数据
	int deleteChart(int id);
}
